import xlrd
import os
import csv

import pandas as pd


def xlsx_to_csv(name):
    data_xls = pd.read_excel(name, index_col=0)
    data_xls.to_csv(name.sub('xlxs','csv'), encoding='utf-8')


if __name__ == '__main__':
	f_list=os.listdir('./')

	for i in f_list:
		if os.path.splitext(i)[1] == '.xlsx':
			xlsx_to_csv(i)
    
